<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<head>
    <title>用户登录</title>
    <script>
        function bug1(){
            var username = document.steam.username.value;
            var password = document.steam.password.value;

            var usernames = /^\w{6,20}$/;
            var passwords = /^\w{5,15}$/;
            if(username=="" || password==""){
                alert("账号或密码不能为空!");
                return false;
            }
            if (!usernames.test(username)){
                alert("账号输入格式错误")
                return false;
            }
            if (!passwords.test(password)){
                alert("密码输入格式错误")
                return false;
            }
            if(username !="rrr123456")
            {
                alert("账号错误")
                return false;
            }
            if(password !="888888")
            {
                alert("密码错误")
                return false;
            }
            return true ;
        }
    </script>
    <link rel="stylesheet"href="/cell/demo.css">

</head>
<body>
<div id="login-box">

    <form name="steam"onsubmit="return bug1()" method="post" action="/cell/teacher.jsp">
        <h1>
            管理员登录
        </h1>
        <div class="form">
            <div class="item">
                <i class="fa fa-github-alt" style="font-size:24px"></i>
                登录账号:<input type="text"name="username">
            </div>
            <div class="item">
                <i class="fa fa-search" style="font-size:24px"></i>
        登录密码:<input type="password"name="password">
            </div>
            <div class="item">
                <i class="fa fa-search" style="font-size:24px"></i>
        <input type="submit"value="提交">
            </div>

        </div>
    </form>
    <form  method="POST" action="/cell/demo2.html">
        <div class="form">
        <div class="item">
        <input type="submit" value="同学登录" >
        </div>
        </div>
</form>
</div>
</body>
</html>